package com.dmx.net;

public class ConnectionException extends Exception {

	private String addionalDetail = "";

	public ConnectionException() {
		super("ConnectionException");
	}

	public ConnectionException(Throwable cause) {
		super(cause);
	}

	public ConnectionException(Throwable cause, String addionalDetail) {
		super(cause);
		this.addionalDetail = addionalDetail;

	}

	public String getMessage() {
		StringBuffer sb = new StringBuffer();
		if (super.getMessage() != null) {
			sb.append(super.getMessage());
			sb.append("\nFTP Reply is:\n[");
			sb.append(this.addionalDetail);
			sb.append("]");
		}
		return sb.toString();
	}

	public String getAddionalDetail() {
		return addionalDetail;
	}
}
